-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8372155: ReleaseInfoPlugin doesn't handle input file as UTF-8 properly #28399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8372155: ReleaseInfoPlugin doesn't handle input file as UTF-8 properly #28399
Conversation
|
👋 Welcome back sgehwolf! A progress list of the required criteria for merging this PR into |
|
@jerboaa This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 75 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
|
Hello Severin, would it better to (even) specify the expectations of the I might be wrong, but even with the use of |
|
Thanks for the review.
IIUYC, you'd like to have the help text amended for IMO it would be best for
True. If somebody passes an ISO-8859-1 (or any non-utf8) encoded file to |
Correct, but not necessarily UTF-8. I am not familiar where all this release-info gets used during jlink and then in the generated image. So whatever encoding is appropriate for such content, I think we should specify it, in the help text and man page of jlink. |
It expects the input file to be UTF-8 now. So I've added that the plugin help text in 2f48c81
It's the plugin that creates the
I've added it to the |
It's very likely that tools that read the release file aren't using Properties API so I think having it UTF-8 is best. |
The output Question is if it's worth supporting arbitrary input encondings for |
That seems unnecessary complexity, I think we should just keep it as UTF-8. |
src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java
Outdated
Show resolved
Hide resolved
|
Please fix the typo in the PR title. (I corrected the issue title). |
|
Any more input on this one? I'd appreciate a review. Thanks! |
|
Hello Severin, the changes this PR looks good to me. Should anything be specified/noted for the encoding of the key/value of the release-info plugin? |
jaikiran
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wait for Alan's/Roger's review before integrating.
I don't think so. In my testing on Linux with |
AlanBateman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All okay, just a minor comment on a var usage in the test.
|
/integrate |
|
Going to push as commit 42b108b.
Your commit was automatically rebased without conflicts. |
Please review this simple fix to
jlink's--release-infoplugin to handle non-ASCII in vendor strings. The JDK build uses UTF-8 encoding for the producedreleasefile that is being passed tojlinkat build-time via the--release-infoplugin. However, the plugin internally usesjava.util.Properties.load(InputStream)API which assumesISO-8859-1encoding of the input stream. The proposed fix is to use thejava.util.Prorperties.load(Reader)API instead and pass it aReaderwithUTF-8encoding (using nio API).Testing:
test/jdk/tools/jlinktests including the new reg-test which fails prior and passes after the fix.Thoughts?
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28399/head:pull/28399$ git checkout pull/28399Update a local copy of the PR:
$ git checkout pull/28399$ git pull https://git.openjdk.org/jdk.git pull/28399/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28399View PR using the GUI difftool:
$ git pr show -t 28399Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28399.diff
Using Webrev
Link to Webrev Comment